package com.bwie.controller;
import com.bwie.pojo.User;
import com.bwie.service.UserService;
import com.bwie.service.impl.UserServiceImpl;
import com.bwie.utils.R;
import com.bwie.vo.LoginForm;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
* (t_user)表控制层
*
* @author xxxxx
*/
@Api(tags = "用户管理")
@RestController
@RequestMapping("/user/user")
public class UserController {
/**
* 服务对象
*/
    @Autowired
    private UserService userService;
    @ApiOperation("用户登录")
    @PostMapping("/login")
    public R login(@RequestBody  @Validated LoginForm loginForm){
        return userService.login(loginForm);
    }
}
